package com.liang.hellocompose.data

import com.squareup.moshi.JsonClass

import com.squareup.moshi.Json


/**
 * @author suzl
 * @createTime 2021/8/3
 * @Description
 */
@JsonClass(generateAdapter = true)
data class HomeListEntity(
    @Json(name = "curPage")
    val curPage: Int = 0, // 2
    @Json(name = "datas")
    val datas: List<HomeItemEntity> = emptyList(),
    @Json(name = "offset")
    val offset: Int = 0, // 20
    @Json(name = "over")
    val over: Boolean = false, // false
    @Json(name = "pageCount")
    val pageCount: Int = 0, // 546
    @Json(name = "size")
    val size: Int = 0, // 20
    @Json(name = "total")
    val total: Int = 0 // 10919
)

@JsonClass(generateAdapter = true)
data class HomeItemEntity(
    @Json(name = "apkLink")
    val apkLink: String = "",
    @Json(name = "audit")
    val audit: Int = 0, // 1
    @Json(name = "author")
    val author: String = "鸿洋", // 承香墨影
    @Json(name = "canEdit")
    val canEdit: Boolean = false, // false
    @Json(name = "chapterId")
    val chapterId: Int = 0, // 411
    @Json(name = "chapterName")
    val chapterName: String = "", // 承香墨影
    @Json(name = "collect")
    var collect: Boolean = false, // false
    @Json(name = "courseId")
    val courseId: Int = 0, // 13
    @Json(name = "desc")
    val desc: String = "",
    @Json(name = "descMd")
    val descMd: String = "",
    @Json(name = "envelopePic")
    val envelopePic: String = "",
    @Json(name = "fresh")
    val fresh: Boolean = true, // false
    @Json(name = "host")
    val host: String = "",
    @Json(name = "id")
    val id: Int = 0, // 19189
    @Json(name = "link")
    val link: String = "", // https://mp.weixin.qq.com/s/k2JjWoaaa7MIi8fPR-fjgQ
    @Json(name = "niceDate")
    val niceDate: String = "", // 2021-07-30 00:00
    @Json(name = "niceShareDate")
    val niceShareDate: String = "", // 1天前
    @Json(name = "origin")
    val origin: String = "",
    @Json(name = "prefix")
    val prefix: String = "",
    @Json(name = "projectLink")
    val projectLink: String = "",
    @Json(name = "publishTime")
    val publishTime: Long = 0, // 1627574400000
    @Json(name = "realSuperChapterId")
    val realSuperChapterId: Int = 0, // 407
    @Json(name = "selfVisible")
    val selfVisible: Int = 0, // 0
    @Json(name = "shareDate")
    val shareDate: Long = 0, // 1627826192000
    @Json(name = "shareUser")
    val shareUser: String = "",
    @Json(name = "superChapterId")
    val superChapterId: Int = 0, // 408
    @Json(name = "superChapterName")
    val superChapterName: String = "", // 公众号
    @Json(name = "tags")
    val tags: List<Tag> = arrayListOf(Tag("项目", ""), Tag("公众号", "")),
    @Json(name = "title")
    val title: String = "", // requestLayout() 这么问，面试者直呼：「太细了」！
    @Json(name = "type")
    val type: Int = 0, // 0
    @Json(name = "userId")
    val userId: Int = 0, // -1
    @Json(name = "visible")
    val visible: Int = 0, // 1
    @Json(name = "zan")
    val zan: Int = 0 // 0
)

@JsonClass(generateAdapter = true)
data class Tag(
    @Json(name = "name")
    val name: String, // 公众号
    @Json(name = "url")
    val url: String // /wxarticle/list/411/1
)